/*
 * @Author: 许旺玉
 * @Description: 用户接口
 * @Date: 2020-06-28 13:58:32
 * @LastEditTime: 2020-07-06 10:57:18
 * @LastEditors: Please set LastEditors
 */ 
import { ajaxGet,ajaxPost,ajaxPut,ajaxUpload} from '@/utlis/request.js'

export function editPwd(data) { //修改密码
    const url = 'user/edit/pwd'
    return ajaxPost(url, data)
}

export function register(data) { //用户注册
    const url = 'wx/register'
    return ajaxPost(url, data)
}

export function code(params) {  //获取验证码
    const url = 'code'
    return ajaxGet(url, params)
}

export function checkCode(data) { //检查验证码
    const url = 'check/code'
    return ajaxPost(url, data)
}

export function mobile(data) { //修改绑定号码
    const url = 'user/edit/mobile'
    return ajaxPut(url, data)
}

export function user_info(params) { //获取用户信息
    const url = 'user/info'
    return ajaxGet(url, params)
}

export function integralRecord(params) {  //获取积分变动
    const url = 'user/integral/record'
    return ajaxGet(url, params)
}

export function moneyRecord(params) {  //用户金额变动
    const url = 'user/money/record'
    return ajaxGet(url, params)
}

export function integralRule(params) {  //获取积分规则
    const url = 'integral/rule'
    return ajaxGet(url, params)
}

export function userIntegral(params) {  //获取用户积分
    const url = 'user/integral'
    return ajaxGet(url, params)
}

export function userEditInfo(data) { //修改用户信息
    const url = 'user/edit/info'
    return ajaxPut(url, data)
}

export function upload(data) { //修改用户头像
    const url = 'user/upload'
    return ajaxUpload(url, data)
}

export function userIntegral1(params) {  //获取邀请码
    const url = 'user/invite'
    return ajaxGet(url, params)
}